<%--
  Created by IntelliJ IDEA.
  User: lupf
  Date: 2016/4/27
  Time: 16:10
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file=".././common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/views/specially/queryMerchantRiskI.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">
<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="商户风险信息查询"/>
</core:import>
<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/riskInfo/merchantRiskQuery/search" autocomplete="off">
        <table table-form>
            <tr>
                <td class="text-right">
                    风险类型
                </td>
                <td>
                    <select ng-model="vm.queryBean.riskType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in vm.cached.MERCHANT_RISK_TYPE">
                        <option value="">请选择</option>
                    </select>
                </td>
                <td class="text-right">
                    商户简称
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.cusName" class="{{vm.constant.inputClass}}">
                </td>
                <td class="text-right">
                    商户编码
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.cusCode" class="{{vm.constant.inputClass}}" maxlength="32">
                </td>

            </tr>
            <tr>
                <td class="text-right">
                    银行账号
                </td>
                <td>
                    <input type="text" name="bankNo" ng-model="vm.queryBean.bankNo" class="{{vm.constant.inputClass}}" ng-pattern="/^[0-9]{0,32}$/">
                    <div style="color:red" ng-show="queryForm.bankNo.$dirty && queryForm.bankNo.$invalid">
                        <span ng-show="queryForm.bankNo.$error">请填写正确的账/卡号。</span></div>
                </td>
                <td class="text-right">
                    法人证件类型
                </td>
                <td>
                    <select ng-model="vm.queryBean.docType" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in vm.cached.LEGAL_CREDENTIALS_TYPE">
                        <option value="">请选择</option>
                    </select>
                </td>
                <td class="text-right">
                    法人证件号码
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.docCode" class="{{vm.constant.inputClass}}">
                </td>
            </tr>
            <tr>
            <td class="text-right">
                法定代表人（负责人）姓名
            </td>
            <td>
                <input type="text" ng-model="vm.queryBean.legRepName" class="{{vm.constant.inputClass}}">
            </td>
                <td class="text-right">
                 法定代表人（负责人）证件号码
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.legdocCode" class="{{vm.constant.inputClass}}">
                </td>
                <td class="text-right">
                    法定代表人(负责人)手机号
                </td>
                <td>
                    <input type="text" name="mobileNo" ng-model="vm.queryBean.mobileNo" class="{{vm.constant.inputClass}}"  ng-pattern="/^1[0-9]{10}$/">
                    <div style="color:red" ng-show="queryForm.mobileNo.$dirty && queryForm.mobileNo.$invalid">
                        <span ng-show="queryForm.mobileNo.$error">请填写正确的手机号码。</span></div>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    风险事件发生时间
                </td>
                <td>
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.queryBean.occurtimeb"/>
                </td>
                <td class="text-right">
                    服务器IP
                </td>
                <td>
                    <input type="text" name="serverIp" ng-model="vm.queryBean.serverIp" class="{{vm.constant.inputClass}}" ng-pattern="/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/">
                    <div style="color:red" ng-show="queryForm.serverIp.$dirty && queryForm.serverIp.$invalid">
                        <span ng-show="queryForm.serverIp.$error">请填写正确的服务器IP。</span></div>
                </td>
                <td class="text-right">
                    查询范围
                </td>
                <td>
                    <select ng-model="vm.queryBean.scope" name="scope"  class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in vm.cached.QUERY_RANGE" required>
                        <option value="">请选择</option>
                    </select>
                    <div style="color:red" ng-show="queryForm.scope.$dirty && queryForm.scope.$invalid">
                        <span ng-show="queryForm.scope.$error.required">范围是必须的。</span></div>
                </td>
            </tr>
            <tr align="center">
                <td colspan="6">
                    <button type="button" ng-click="vm.queryDetail()" ng-disabled="queryForm.$invalid" class="btn btn-default">查询</button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                    <div  style="color: red;font-size: 13px;">(提示:所填条件不支持模糊匹配;后面带红色星号的为必填项!)</div>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <%--<p class="btn-group">
            <shiro:hasPermission name="sys-user-info_toAddUser">
                <button ng-click="vm.addItem()"><i class="glyphicon glyphicon-plus"></i></button>
            </shiro:hasPermission>
            <shiro:hasPermission name="sys-user-info_doUpdateUser">
                <button ng-click="vm.updateItem()"><i class="glyphicon glyphicon-pencil"></i></button>
            </shiro:hasPermission>
            <shiro:hasPermission name="sys-user-info_doDeleteUser">
                <button ng-click="vm.deleteItem()"><i class="glyphicon glyphicon-minus"></i></button>
            </shiro:hasPermission>

            <shiro:hasPermission name="sys-user-info_toAudit">
                <button ng-click="vm.auditItem('02')">审核</button>
            </shiro:hasPermission>
            <shiro:hasPermission name="user-info_fixChanStatus_close">
                <button ng-click="vm.auditItem('05')">停用</button>
            </shiro:hasPermission>
        </p>--%>
        <table table-detail>
            <thead>
            <tr>
                <th>
                    <input type="checkbox" ng-model="_checkedAll" checkbox-all="vm.pagination.list">
                </th>
                <th>客户属性</th>
                <th>风险类型</th>
                <th>客户简称</th>
                <th>法人证件号码</th>
                <th>银行帐/卡号</th>
                <th>开户行</th>
               <%-- <th>收款银行帐/卡号</th>--%>
                <th>法定代表人姓名</th>
                <th>法定代表人证件号码</th>
                <th>风险事件发生时间</th>
                <th>风险事件结束时间</th>
                <th>风险事件发生渠道</th>
                <th>风险事件发生地域</th>
                <th>有效性</th>
                <th>详情</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="bean in vm.pagination.list track by $index">
                <td>
                    <input name="check" type="checkbox" ng-model="bean._checked">
                </td>
                <td>{{vm.cached.CUSTPROPERTY[bean.cusProperty]}}</td>
                <td>{{vm.cached.MERCHANT_RISK_TYPE[bean.riskType]}}</td>
                <td>{{bean.cusName}}</td>
                <td>{{bean.docCode}}</td>
                <td>{{bean.bankNo}}</td>
                <td>{{bean.openBank}}</td>
               <%-- <td>{{bean.recBankNo}}</td>--%>
                <td>{{bean.legRepName}}</td>
                <td>{{bean.legDocCode}}</td>
                <td>{{bean.occurtimeb | date:"yyyy-MM-dd HH:mm:ss"}}</td>
                <td>{{bean.occurtimee | date:"yyyy-MM-dd HH:mm:ss"}}</td>
                <td>{{vm.cached.RISK_EVENT_CHANNEL[bean.occurchan]}}</td>
                <td>{{bean.occurarea}}</td>
                <td>{{vm.cached.VALIDITY[bean.validStatus]}}</td>
             <%-- <td>  <button ng-click="vm.queryDetail(bean)" title="查看">查看详情</button></td>--%>
                <td>  <button type="button" class="btn btn-info btn-sm"  ng-click="vm.queryDetailInfo(bean)" title="打开商户风险信息详情页面">查看详情</button></td>
             <%--   <td>
                    <shiro:hasPermission name="user-info_toUserRole">
                        <button ng-click="vm.roleAllocate(bean)">角色分配</button>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="user-info_toResetUserPwd">
                        <button ng-click="vm.resetPwd(bean)">密码重置</button>
                    </shiro:hasPermission>
                </td>--%>
            </tr>
            </tbody>
        </table>
    </div>

    <%--<core:import url="../common/pageFoot.jsp"/>--%>
</div>
<core:import url="../common/nav.jsp"/>
</body>
</html>
